package com.springcore.ioc;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.tomcat.jni.Address;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/*
 *
 *
 *
 */
//自动添加setter和getter和final修饰的参数构造器
//toString方法
//equals方法
//hashCode方法
@Data
@AllArgsConstructor
@NoArgsConstructor
@Component
public class User {
    @Value("${user.username}")
    private String name;

    @Value("${user.age}")
    private int age;

    @Value("${user.address}")
    private String address;
}
